package com.rockcent.mall.lib.repository;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.ChannelType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by zhangjh on 2016/10/24.
 */
@Repository
public interface ChannelTypeRepository extends JpaRepository<ChannelType, Long>, JpaSpecificationExecutor ,ChannelTypeRepositoryCustom{

     List<ChannelType> findByParentIdIsNullAndIsDelete(Whether isdelete);

    List<ChannelType> findByParentIdAndIsDelete(Long parentId, Whether isdelete);
}
